//
//  TestViewController.m
//  Weshare
//
//  Created by Mike on 16/3/29.
//  Copyright © 2016年 wxwl. All rights reserved.
//

#import "TestViewController.h"
#import "MSLoginViewController.h"
#import "MSRegistViewController.h"
#import "MSRegistSuccessViewController.h"
#import "MSAreaViewController.h"
#import "MSindustryViewController.h"
#import "MSStageViewController.h"
#import "MSTradeCommentViewController.h"
#import "MSContactsCorrectViewController.h"
#import "MSCreatProjectViewController.h"
#import "MSInviteFriendsViewController.h"


@interface TestViewController ()

@end

@implementation TestViewController

-(void) initNavigationBar{
    [super initNavigationBar];
    titleLable.text = @"测试";
    leftBarBtn.hidden = NO;
}

- (void)initUI
{
    UIButton *payBtn = [self creatBtnWithTitle:@"登录" Frame:CGRectMake(30, 80, 40, 40)];
    [payBtn addTarget:self action:@selector(pushToPaySuccess) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *orderPayBtn = [self creatBtnWithTitle:@"纠错" Frame:CGRectMake(30, 130, 40, 40)];
    [orderPayBtn addTarget:self action:@selector(pushToPay) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *taowuBtn = [self creatBtnWithTitle:@"注册" Frame:CGRectMake(80, 80, 40, 40)];
    [taowuBtn addTarget:self action:@selector(pushToAdd) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *editBtn = [self creatBtnWithTitle:@"创建项目" Frame:CGRectMake(80, 130, 40, 40)];
    [editBtn addTarget:self action:@selector(pushToEdit) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *taowuBtn3 = [self creatBtnWithTitle:@"注册2" Frame:CGRectMake(130, 80, 40, 40)];
    [taowuBtn3 addTarget:self action:@selector(pushToAddress) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *editBtn3 = [self creatBtnWithTitle:@"邀请好友" Frame:CGRectMake(130, 130, 40, 40)];
    [editBtn3 addTarget:self action:@selector(pushToAddress2) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *taowuBtn2 = [self creatBtnWithTitle:@"行业" Frame:CGRectMake(180, 80, 40, 40)];
    [taowuBtn2 addTarget:self action:@selector(pushToRoute) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *editBtn2 = [self creatBtnWithTitle:@"年卡成功" Frame:CGRectMake(180, 130, 40, 40)];
    [editBtn2 addTarget:self action:@selector(pushToGift) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *activateBtn = [self creatBtnWithTitle:@"注册成功" Frame:CGRectMake(230, 80, 40, 40)];
    [activateBtn addTarget:self action:@selector(pushToActivate) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *memberPayBtn = [self creatBtnWithTitle:@"会费支付" Frame:CGRectMake(230, 130, 40, 40)];
    [memberPayBtn addTarget:self action:@selector(pushToMemberPay) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *addBtn = [self creatBtnWithTitle:@"选择地址" Frame:CGRectMake(30, 180, 40, 40)];
    [addBtn addTarget:self action:@selector(pushToChoose) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *historyBtn = [self creatBtnWithTitle:@"选择会籍" Frame:CGRectMake(80, 180, 40, 40)];
    [historyBtn addTarget:self action:@selector(pushToHistory) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *purchaseBtn = [self creatBtnWithTitle:@"购买支付" Frame:CGRectMake(130, 180, 40, 40)];
    [purchaseBtn addTarget:self action:@selector(pushToPurchasePay) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *purchaseCardBtn = [self creatBtnWithTitle:@"购买年卡" Frame:CGRectMake(180, 180, 40, 40)];
    [purchaseCardBtn addTarget:self action:@selector(pushToPurchaseCard) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *purchaseCoinBtn = [self creatBtnWithTitle:@"购买游币" Frame:CGRectMake(230, 180, 40, 40)];
    [purchaseCoinBtn addTarget:self action:@selector(pushToPurchaseCoin) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *checkBtn = [self creatBtnWithTitle:@"选择入住人" Frame:CGRectMake(30, 330, 50, 50)];
    [checkBtn addTarget:self action:@selector(pushToCheck) forControlEvents:UIControlEventTouchUpInside];
    
}

- (UIButton*)creatBtnWithTitle:(NSString*)title Frame:(CGRect)frame{
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
    btn.frame = frame;
    btn.backgroundColor = kYellowColor;
    [btn setTitle:title forState:UIControlStateNormal];
    btn.titleLabel.numberOfLines = 0;
    btn.titleLabel.font = [UIFont fontWithName:@"STHeitiSC-Light" size:15];
    [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.view addSubview:btn];
    
    return btn;
}

- (void)pushToPaySuccess{
    MSLoginViewController *vc = [[MSLoginViewController alloc] init];
    [rootNavigation pushViewController:vc animated:YES];
}

- (void)pushToPay{
    MSContactsCorrectViewController *vc = [[MSContactsCorrectViewController alloc] init];
    [rootNavigation pushViewController:vc animated:YES];
}

- (void)pushToAdd
{
    MSRegistViewController *vc = [[MSRegistViewController alloc] init];
    vc.registType = MSRegistType_Regist;
    [rootNavigation pushViewController:vc animated:YES];
}

- (void)pushToEdit
{
    MSCreatProjectViewController *vc = [[MSCreatProjectViewController alloc] init];
    [rootNavigation pushViewController:vc animated:YES];
}

- (void)pushToAddress{
    MSRegistSecondViewController *vc = [[MSRegistSecondViewController alloc] init];
    vc.registType = MSRegistType_Regist;
    [rootNavigation pushViewController:vc animated:YES];
}

- (void)pushToAddress2{
    MSInviteFriendsViewController *vc = [[MSInviteFriendsViewController alloc] init];
    [rootNavigation pushViewController:vc animated:YES];
}

- (void)pushToRoute
{
    MSAreaViewController *vc = [[MSAreaViewController alloc] init];
    [rootNavigation pushViewController:vc animated:YES];
}

- (void)pushToGift
{
    
}

- (void)pushToActivate{
    MSRegistSuccessViewController *vc = [[MSRegistSuccessViewController alloc] init];
    [rootNavigation pushViewController:vc animated:YES];
}

- (void)pushToMemberPay{
    
}

- (void)pushToChoose
{
    
}

- (void)pushToHistory{
    
}

//支付
- (void)pushToPurchasePay{
    
}

//买年卡
- (void)pushToPurchaseCard{
    
}

- (void)pushToPurchaseCoin{
    
}

- (void)pushToCheck
{
    
}


@end
